package com.qd.system.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 内容发布
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("sys_article")
public class Article extends Model<Article> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "article_id", type = IdType.ASSIGN_ID)
    private String articleId;
    /**
     * 标题
     */
    @TableField("title")
    private String title;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;
    /**
     * 发表时间
     */
    @TableField("report_time")
    private LocalDate reportTime;
    /**
     * 概述
     */
    @TableField("summary")
    private String summary;
    /**
     * 点击数
     */
    @TableField("hint_count")
    private long hintCount;
    /**
     * 机构ID
     */
    @TableField("org_id")
    private String orgId;
    /**
     * 创建人
     */
    @TableField("person_id")
    private String personId;
    /**
     * 题材分类
     */
    @TableField("article_type")
    private String articleType;
    /**
     * 是否发布
     */
    @TableField("is_publish")
    private String isPublish;

    public void freeData() {
        this.articleId = null;
        this.title = null;
        this.createTime = null;
        this.reportTime = null;
        this.summary = null;
        this.orgId = null;
        this.personId = null;
        this.articleType = null;
        this.isPublish = null;
    }

}
